<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<div class="xsnazzy">
	<h1>Salvestatud kliendipöördumine nr. ${sr.serviceRequest }</h1>
	<br>
	<table>
		<tr>
			<td vAlign="top"><b>Klient</b></td>
			<td>
                <c:forEach items="${customers}" var="cust">
                    <c:if test="${sr.customerFk == cust.customer}">
                        <c:out value="${cust.subject.firstName}"/> <c:out value="${cust.subject.lastName}"/>
                    </c:if>
                </c:forEach></td>
		</tr>
		<tr>
			<td vAlign="top"><b>Sisestaja</b></td>
			<td>${user}</td>
		</tr>
		<tr>
			<td vAlign="top"><b>Loomise kuupäev</b></td>
			<td>${sr.created }</td>
		</tr>
		<tr>
			<td vAlign="top"><b>Kliendi märkused</b></td>
			<td>${sr.serviceDescByCustomer }</td>
		</tr>
		<tr>
			<td vAlign="top"><b>Töötaja märkused</b></td>
			<td>${sr.serviceDescByEmployee }</td>
		</tr>
		<tr>
			<td vAlign="top"><b>Töö staatus</b></td>
			<td>
                <c:forEach items="${statuses}" var="stat">
                    <c:if test="${sr.serviceRequestStatusTypeFk == stat.serviceRequestStatusType}">
                        <c:out value="${stat.typeName}"/>
                    </c:if>
                </c:forEach></td>
		</tr>
		<tr>
			<td colspan="2"><a href="<c:url value='/new.htm'/>" class="btn"><span>Tagasi</span>
			</a></td>
		</tr>
	</table>
</div>
<br>
<br>
